<?php
namespace app\api\controller\yluser;

class Withdraw extends Base{

    public function __construct() {
        parent::__construct();
        $this->checkLogin();
    }

    #申请自动提现
    public function add(){
        $d = $this->post;
        $rule = [
            'bank_id'=>'require',
        ];
        $msg = [];
        check($rule,$msg,$d);
        $rs = $this->db->update("user",['id'=>$this->userinfo['id'],'bank_id'=>$d['bank_id'],'is_auto'=>$d['is_auto']]);
        suc("申请成功");
    }

}
?>
